package com.design.absfactory;

import com.design.absfactory.factory.AmdFactory;
import com.design.absfactory.factory.IntelFactory;

/**
 * Created by Administrator on 2016/8/27.
 */
public class Client {

    public static void main(String[] args) {

        ComputerEngineer engineer = new ComputerEngineer();

        // 简单工厂，需要传入电脑的详细配置，可能造成兼容性问题
//        engineer.makeComputer(1, 1);


        // 抽象工厂
        engineer.makeComputer(new IntelFactory());

        engineer.makeComputer(new AmdFactory());
    }
}
